List MCC
List MCC
Service ini digunakan untuk melihat list kode dari Merchant Category Code
Service Info
HTTP Method | GET |
---|---|
Service Code | 34 |
Http Method | GET |
Path | .../v1.0/list/mcc |
Authentication | OAuth 2.0 |
Header
Header Name | Tipe Data | Wajib | Deskripsi |
---|---|---|---|
Content-Type | String | Y | application/json |
X-PARTNER-ID | String | Y | Client’s client_id (diberikan pada saat onboarding ) |
- CURL
- PHP
- NODE JS
- GO
curl --location --request GET '../v1.0/list/mcc' \
--header 'x-partner-id: 6c57db4e-9e11-4951-9bcf-d6f177dafbcc' \
--header 'Authorization: Bearer 950c7e34-6365-4359-90f2-9bfaf88c51f7'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '../v1.0/list/mcc',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'x-partner-id: 6c57db4e-9e11-4951-9bcf-d6f177dafbcc',
'Authorization: Bearer 950c7e34-6365-4359-90f2-9bfaf88c51f7'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var request = require('request');
var options = {
'method': 'GET',
'url': '../v1.0/list/mcc',
'headers': {
'x-partner-id': '6c57db4e-9e11-4951-9bcf-d6f177dafbcc',
'Authorization': 'Bearer 950c7e34-6365-4359-90f2-9bfaf88c51f7'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "../v1.0/list/mcc"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("x-partner-id", "6c57db4e-9e11-4951-9bcf-d6f177dafbcc")
req.Header.Add("Authorization", "Bearer 950c7e34-6365-4359-90f2-9bfaf88c51f7")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Response
Parameter | Tipe Data | Deskripsi |
---|---|---|
responseCode | String | Kode response |
responseMessage | String | Pesan response |
additionalInfo | Array Of Object | Informasi tambahan. |
code | String | Code MCC |
category | String | Nama Kategori |
description | String | Deskripsi |
{
"responseCode": "2003400",
"responseMessage": "Successful",
"additionalInfo": [
{
"code": "5812",
"category": "Eating Places and Restaurants",
"description": "Eating Places and Restaurants"
},
{
"code": "5813",
"category": "Drinking Places (Alcoholic Beverages) - Bars, Taverns, Nightclubs, Cocktail Lounges, and Discotheques",
"description": "Drinking Places (Alcoholic Beverages) - Bars, Taverns, Nightclubs, Cocktail Lounges, and Discotheques"
},
{
"code": "5821",
"category": "Others Not Elsewhere Classified",
"description": "Others Not Elsewhere Classified"
},
{
"code": "9950",
"category": "Intra-Company Purchases",
"description": "Intra-Company Purchases"
},
{
"code": "9752",
"category": "U.K. Petrol Stations, Electronic Hot File",
"description": "U.K. Petrol Stations, Electronic Hot File"
},
{
"code": "5814",
"category": "Quick Payment Service-Fast Food Restaurants",
"description": "Quick Payment Service-Fast Food Restaurants"
},
{
"code": "5311",
"category": "Department Stores",
"description": "Department Stores"
},
{
"code": "5811",
"category": "Caterers - Prepare & Delivery",
"description": "Caterers - Prepare & Delivery"
}
]
}
List Response Code
Response Code | Response Message | Description |
---|---|---|
2003400 | Success | |
4003401 | Invalid field format { field name } | |
4013400 | Unauthorized. Invalid Signature | X-Signature salah |
4093400 | Cannot use same X-EXTERNAL-ID in same day | X-External-ID sudah pernah digunakan di hari yang sama |
4043401 | Bad Request | Request header ada yang salah / kurang |
4043400 | Unauthorized. Client Forbidden Access API | Partner tidak dapat mengakses api terkait |
5003401 | General Error | Terjadi kesalahan |